<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libslic3r: Slic3r::ZipArchive Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Slic3r_192px_transparent.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libslic3r
   </div>
   <div id="projectbrief">Library for generating gcode from 3d models</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_slic3r.html">Slic3r</a></li><li class="navelem"><a class="el" href="class_slic3r_1_1_zip_archive.html">ZipArchive</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_slic3r_1_1_zip_archive-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Slic3r::ZipArchive Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A zip wrapper for Miniz lib.  
 <a href="class_slic3r_1_1_zip_archive.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_zip_archive_8hpp_source.html">ZipArchive.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0666d1f19682584ec901c99357315053"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_slic3r_1_1_zip_archive.html#a0666d1f19682584ec901c99357315053">ZipArchive</a> (std::string zip_archive_name, char zip_mode)</td></tr>
<tr class="separator:a0666d1f19682584ec901c99357315053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a187a6b98181ec901d4c792ff6360c64c"><td class="memItemLeft" align="right" valign="top">mz_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_slic3r_1_1_zip_archive.html#a187a6b98181ec901d4c792ff6360c64c">z_stats</a> ()</td></tr>
<tr class="separator:a187a6b98181ec901d4c792ff6360c64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56df0c02ef2ccc8f4112a593e5bc14b7"><td class="memItemLeft" align="right" valign="top">mz_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_slic3r_1_1_zip_archive.html#a56df0c02ef2ccc8f4112a593e5bc14b7">add_entry</a> (std::string entry_path, std::string file_path)</td></tr>
<tr class="separator:a56df0c02ef2ccc8f4112a593e5bc14b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a849d80a4cdeb652c7c77c9f0b710aed2"><td class="memItemLeft" align="right" valign="top">mz_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_slic3r_1_1_zip_archive.html#a849d80a4cdeb652c7c77c9f0b710aed2">extract_entry</a> (std::string entry_path, std::string file_path)</td></tr>
<tr class="separator:a849d80a4cdeb652c7c77c9f0b710aed2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01331de8e41c7f75539014700d276298"><td class="memItemLeft" align="right" valign="top">mz_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_slic3r_1_1_zip_archive.html#a01331de8e41c7f75539014700d276298">finalize</a> ()</td></tr>
<tr class="separator:a01331de8e41c7f75539014700d276298"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a843e081d1f8f5aabe2023ce2f732b427"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_slic3r_1_1_zip_archive.html#a843e081d1f8f5aabe2023ce2f732b427">~ZipArchive</a> ()</td></tr>
<tr class="separator:a843e081d1f8f5aabe2023ce2f732b427"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A zip wrapper for Miniz lib. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0666d1f19682584ec901c99357315053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0666d1f19682584ec901c99357315053">&#9670;&nbsp;</a></span>ZipArchive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Slic3r::ZipArchive::ZipArchive </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>zip_archive_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>zip_mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a zip archive. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">zip_archive_name</td><td>string the name of the zip file. </td></tr>
    <tr><td class="paramname">zip_mode</td><td>char the zip archive mode ('R' means read mode, 'W' means write mode). you cannot change the mode for the current object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a843e081d1f8f5aabe2023ce2f732b427"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a843e081d1f8f5aabe2023ce2f732b427">&#9670;&nbsp;</a></span>~ZipArchive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Slic3r::ZipArchive::~ZipArchive </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a56df0c02ef2ccc8f4112a593e5bc14b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56df0c02ef2ccc8f4112a593e5bc14b7">&#9670;&nbsp;</a></span>add_entry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mz_bool Slic3r::ZipArchive::add_entry </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>entry_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>file_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a file to the current zip archive. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">entry_path</td><td>string the path of the entry in the zip archive. </td></tr>
    <tr><td class="paramname">file_path</td><td>string the path of the file in the disk. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>mz_bool 0: failure 1: success. </dd></dl>

</div>
</div>
<a id="a849d80a4cdeb652c7c77c9f0b710aed2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a849d80a4cdeb652c7c77c9f0b710aed2">&#9670;&nbsp;</a></span>extract_entry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mz_bool Slic3r::ZipArchive::extract_entry </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>entry_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>file_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Extract a zip entry to a file on the disk. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">entry_path</td><td>string the path of the entry in the zip archive. </td></tr>
    <tr><td class="paramname">file_path</td><td>string the path of the file in the disk. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>mz_bool 0: failure 1: success. </dd></dl>

</div>
</div>
<a id="a01331de8e41c7f75539014700d276298"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01331de8e41c7f75539014700d276298">&#9670;&nbsp;</a></span>finalize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mz_bool Slic3r::ZipArchive::finalize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Finalize the archive and free any allocated memory. </p><dl class="section return"><dt>Returns</dt><dd>mz_bool 0: failure 1: success. </dd></dl>

</div>
</div>
<a id="a187a6b98181ec901d4c792ff6360c64c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a187a6b98181ec901d4c792ff6360c64c">&#9670;&nbsp;</a></span>z_stats()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mz_bool Slic3r::ZipArchive::z_stats </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the status of the previous operation applied on the zip_archive. </p><dl class="section return"><dt>Returns</dt><dd>mz_bool 0: failure 1: success. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/libslic3r/Zip/<a class="el" href="_zip_archive_8hpp_source.html">ZipArchive.hpp</a></li>
<li>src/libslic3r/Zip/<a class="el" href="_zip_archive_8cpp.html">ZipArchive.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
